package com.itheima.controller;


import com.itheima.commom.BusinessException;
import com.itheima.commom.CommonErrorCode;
import org.springframework.web.bind.annotation.*;


/**
 * @author Administrator
 * @version 1.0
 **/
@RestController
public class MerchantController {

   @RequestMapping("/registerMerchant")
    public String registerMerchant(String name,String password){

        //校验参数的合法性
        if(name == null || name.equals("")){
            throw new BusinessException(CommonErrorCode.E_100110);
        }
        if(password== null || password.equals("")) {
            throw new BusinessException(CommonErrorCode.E_100112);
        }

        return "abc";
    }


}
